using UnityEngine;
using UnityEngine.SceneManagement;

public class GameManager : MonoBehaviour
{
    public string m_CurrentSceneName = "";
    private void Awake()
    {

    }
    void Start()
    {

    }

    // Update is called once per frame
    void Update()
    {
        if (m_CurrentSceneName == "MainWorld")
        {
            WorldManager.Instance.Update();
            IntersectionObjManager.Instance.Update();
        }
    }
    public void OnSceneLoaded(Scene scene, LoadSceneMode mode)
    {
        Debug.Log("OnSceneLoaded");
        m_CurrentSceneName = scene.name;
        if (m_CurrentSceneName == "MainWorld")
        {
            WorldManager.Instance.Init();
            IntersectionObjManager.Instance.Init();
        }
    }
}
